﻿@page
@model BoYuanCore.WebForm.Pages.Admin.LoginModel
@{
    ViewBag.Title = "后台管理系统";
    var F = Html.F();
}
@section head {
    <link href="/res/CSS/loginStyle.css" rel="stylesheet" type="text/css" media="all" />
}
@section body {
    <div class="login-form" style="margin-top: 100px">
        <h1>后台管理系统</h1>
        <div class="login-top">
            <form>
                <div class="login-ic">
                    <i></i>
                    <input type="text" value="" id="user" placeholder="输入用户名" />
                    <div class="clear"></div>
                </div>
                <div class="login-ic">
                    <i class="icon"></i>
                    <input type="password" value="" id="pasd" placeholder="输入登录口令" />
                    <div class="clear"></div>
                </div>

                <div class="log-bwn">
                    <input type="button" value="登陆" id="dl" onclick="login()">
                </div>
            </form>
        </div>
        <p class="copy"> <a target="_blank">  © 2024 xx科技  </a></p>
    </div>
    <f:Panel ID="Panel1" Hidden="true">
        <Items>
            <f:HiddenField ID="u" />
            <f:HiddenField ID="p" />
            </Items>
    </f:Panel>
 
}
@section script
{
    <script>
        function login() {
            if ($("#user").val().length == 0 || $("#pasd").val().length == 0) {
                AlertError("用户名和登录口令必填");
                return;
            }
            F.ui.u.setValue($("#user").val());
            F.ui.p.setValue($("#pasd").val());
            __doPostBack('', 'LoginEvent'); 
        }

        F.ready(function () {
            $(document).keyup(function (event) {
                if (event.keyCode == 13) {
                    login();
                }
            });
        });
    </script>
}
